package com.exapmle.commands

import org.springframework.beans.factory.annotation.Autowired
import org.springframework.shell.ParameterResolver
import org.springframework.shell.standard.ShellComponent
import org.springframework.shell.standard.ShellMethod

@ShellComponent
class Cmd1 {
    public interface Command {
    }

    private final List<ParameterResolver> parameterResolvers;

    @Autowired
    public Cmd1(List<ParameterResolver> parameterResolvers) {
        this.parameterResolvers = parameterResolvers;
    }

    @ShellMethod(value = "Exit the shell.", key = "cmdtest")
    public void cmdTest() {
        println("command test hello !")

    }
//    @ShellMethod("Translate text from one language to another.")
//    public String cmdTest(
//            @ShellOption(value = "param1", defaultValue = "defaultV1", help = "param help txt") String text
//    ) {
//        // invoke service
//        println("hello ")
//
////        return service.translate(text, from, to);
//        return "service.translate(text, from, to);"
//    }

}
